from peewee import BigAutoField, CharField
from common.model.abstrct import AbstractModel


class Mall(AbstractModel):

    class Meta:
        table_name = "tb_mall"
        auto_increment_base = 100_000
        indexes = (
            (("code", ), True),
        )

    mall_id = BigAutoField(primary_key=True)
    name = CharField(max_length=16, help_text="商城名字")
    description = CharField(max_length=255, null=True, help_text="描述")
    code = CharField(max_length=16, help_text="商城唯一code")
    icon = CharField(max_length=128, null=True, help_text="商城的图标")